package com.cheng.admin.service.order.states;

import com.cheng.admin.constant.Constants;
import com.cheng.common.exception.CustomException;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Service;

import java.util.Map;

@Order(Constants.ORDER_STATUS_FINISHED)
@Service
public class ConfirmState implements OrderState {
    @Override
    public String pay(Long id) {
        throw new CustomException("已支付请勿重复支付");
    }

    @Override
    public Map<String, String> cancel(Long id) {
        throw new CustomException("已支付无法取消订单");
    }


    @Override
    public Map<String, String> ship(Long id, String logisticsNo) {
        throw new CustomException("已发货请勿重新发货");
    }

    @Override
    public Map<String, String> confirm(Long id) {
        throw new CustomException("已确认请勿重新确认");
    }
}
